package com.shudes.game;

import java.util.*;

import com.shudes.pt.pojo.*;

public class PTHoldemGame extends HoldemGame {

	protected Game game; 
	protected Map<Player, GamePlayer> villianPlayers; 
	protected Map<Player, HoleCards> villianCards;
	protected Player hero; 
	
	public PTHoldemGame(Game g, Collection<GamePlayer> gps) {
		super(g.getNumberOfPlayers());

		villianCards = new HashMap<Player, HoleCards>();
		villianPlayers = new HashMap<Player, GamePlayer>();
		
		setBoard(CardCollectionFactory.board(g));
		setGame(g); 
		setHero(g.getPlayer());

		fillMaps(gps); 						
	}
	
	private void fillMaps(Collection<GamePlayer> gps) {
		
		for(GamePlayer gp : gps) {
			villianCards.put(gp.getPlayer(), CardCollectionFactory.holeCards(gp));
			villianPlayers.put(gp.getPlayer(), gp);
			this.holeCards.put(new Seat(gp.getOffTheButton()), CardCollectionFactory.holeCards(gp)); 						
		}
	}

	public Game getGame() {
		return game;
	}

	public void setGame(Game game) {
		this.game = game;
	}

	public Player getHero() {
		return hero;
	}

	public void setHero(Player hero) {
		this.hero = hero;
	}
	
	

	
	
}
